package com.xiegang.orderservice.remote;

import com.xiegang.internalcommon.dto.Car;
import com.xiegang.internalcommon.dto.ResponseResult;
import com.xiegang.internalcommon.response.OrderDriverResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author xieGang
 * @description
 * @date 2023/4/9 16:30
 **/

@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {

    @RequestMapping(method = RequestMethod.GET,value = "/city-driver/is-alailable-driver")
    public ResponseResult<Boolean> isAvailableDriver(@RequestParam String cityCode);

    @GetMapping("/get-available-driver/{carId}")
    public ResponseResult<OrderDriverResponse> getAvailableDriver(@PathVariable("carId")Long carId);

    @GetMapping("/car")
    public ResponseResult<Car> getCarByCarId(@RequestParam Long carId);
}
